home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_056 / mcad / mp / mp.doc < prev    next >
Text File  |  1992-05-06  |  6KB  |  162 lines

  1. **************************************************************************
  2.  
  3.     THIS SOFTWARE IS IN THE PUBLIC DOMAIN.  IT IS INTENDED TO
  4.     BE AVAILABLE FREE TO WHOMEVER WANTS IT.  YOU MAY USE AND
  5.     DISTRIBUTE IT AS YOU LIKE WITH THE FOLLOWING RESTRICTIONS:
  6.  
  7.     1)  You may not sell this software or charge more than a
  8.         small copying/hassle fee for distributing it.
  9.  
  10.     2)  Don't remove this notice from the distribution.
  11.  
  12.         Tim Mooney
  13.         120 Purefoy Rd.
  14.         Chapel Hill, NC 27514
  15.     also:
  16.         Physics Dept.
  17.         Phillips Hall
  18.         University of NC
  19.         Chapel Hill, NC 27514
  20.  
  21. ****************************************************************************
  22.  
  23.     Mp (short for "Multi-Plot"; the name is stupid, but it's 3 years
  24. old now and I've gotten used to it) plots data embedded in a text file. 
  25. You tell mp in which "columns" to expect numbers to plot.  Mp reads
  26. the file, looking for lines containing numbers in all of those "columns". 
  27. (The first word on a line is, by definition here, in "column" 1.)
  28. When such a line is found, mp begins to store the numbers in arrays.  If,
  29. while accumulating an array of data, a line is found which doesn't
  30. contain numbers in all the target "columns", the array is set aside
  31. and mp continues reading, looking for more data.  Any number of plots can
  32. be accumulated in this way.  Numbers, by the way, may be real, integer, or
  33. mixed;  mp doesn't care.
  34.  
  35. ***************************************************************************
  36. CALLING UP THE PROGRAM
  37.  
  38.     Mp is run from the CLI like so:
  39.  
  40. mp [flags] filename
  41.  
  42.     The flags tell mp where, in the file, to look for numbers it
  43. can plot.  Let's say the file to be plotted is called "plotme.dat", and
  44. the lines in this file which contain data look like:
  45.  
  46. x    y    err_in_y
  47. .    .    .
  48. .    .    .
  49. .    .    .
  50.  
  51.   Some command line examples for this file:
  52.  
  53. 1)    mp plotme.dat
  54. THIS TELLS MP TO USE DEFAULTS FOR THE COLUMN NUMBERS.  MP ASSUMES THE
  55. FIRST COLUMN IS X DATA, AND THE SECOND COLUMN IS Y DATA.
  56.  
  57. 2)    mp -x1y2 plotme.dat
  58. THIS MEANS EXACTLY THE SAME THING AS (1)
  59.  
  60. 3)    mp -x1y2e3 plotme.dat
  61. THE FIRST COLUMN IS X DATA, THE SECOND IS Y DATA, AND THE THIRD IS
  62. ERROR_IN_Y DATA.  (MP DOESN'T COLLECT ERROR_IN_Y DATA UNLESS YOU TELL
  63. IT TO.)
  64.  
  65. 4)    mp -x0y1 plotme.dat
  66. HERE IS SOMETHING NEW.  THIS SAYS THAT X DATA ARE IN COLUMN 0.  THERE IS
  67. NO COLUMN 0, HOWEVER.  MP UNDERSTANDS THAT THE FILE CONTAINS NO X DATA,
  68. AND USES LINE NUMBERS -- RELATIVE TO THE BEGINNING OF A LIST -- FOR X.
  69.  
  70. 5)    mp -e plotme.dat
  71. THIS USES A LOT OF DEFAULTS: X IS ASSUMED TO BE IN COLUMN 1 -- SINCE NO
  72. -X FLAG OCCURS;  Y IS ASSUMED TO BE IN THE NEXT COLUMN -- SINCE NO -Y
  73. FLAG OCCURS.  THE COMMAND LINE SAYS THAT THE FILE CONTAINS ERROR_IN_Y
  74. DATA, BUT DOESN'T SAY WHERE.  THE DEFAULT IS THE COLUMN AFTER THE Y DATA.
  75. WE COULD HAVE GOTTEN THE SAME RESULT WITH "mp -x1y2e3 plotme.dat".
  76.  
  77.     See comments in the file "getdat.c" for a more exact description.
  78.  
  79. **************************************************************************
  80. SPECIFYING THE DISPLAY OF COLLECTED DATA
  81.  
  82.     When the file has been read, mp tells you how many lists of
  83. numbers it found and asks how to plot the data.  You choose which
  84. lists and how the chosen lists are to be plotted.  For each list, you
  85. can choose a color or accept a default color.  You can choose a line plot,
  86. a point plot, or both for any list.  If your choice includes a point plot,
  87. you can choose a point size.  (Defaults exist for every choice.)
  88.  
  89.     The line of text you type to tell mp how to plot the data is
  90. called (by me) a "HowTo string".  (This is the worst part of the user
  91. interface and is left over from mp's humble beginnings on a VAX.)
  92. The syntax is pretty well described in the source code ("gethowto.c")
  93. and you can get instructions interactively by typing "?".  I'm not
  94. going to repeat all the details here, but I will give examples which
  95. can be used with the sample data file "plotme.dat".
  96.  
  97. 1)    carriage return
  98. THIS GETS A DEFAULT FOR ALL ACCUMULATED LISTS: LINE PLOTS IN COLORS
  99. BEGINNING WITH 0 AND INCREASING.
  100.  
  101. 2)    !p
  102. THIS GETS A POINT PLOT FOR ALL LISTS.  THE POINT SIZE IS 4 (DEFAULT).
  103. THE COLORS BEGIN WITH 0 AND INCREASE.
  104.  
  105. 3)    1p 2p 3p 4p
  106. THIS GETS POINT PLOTS FOR THE FIRST FOUR LISTS AND NO PLOT FOR THE REST.
  107. THE COLORS ARE 1 2 3 4.  THE POINT SIZE IS 4.
  108.  
  109. 4)    p1 p2 p3 p4
  110. THIS GETS POINT PLOTS IN DEFAULT COLORS FOR THE FIRST FOUR LISTS AND
  111. NO PLOT FOR THE REST.  THE POINT SIZE IS 1 (MINIMUM) FOR THE FIRST PLOT,
  112. 2 FOR THE SECOND...
  113.  
  114. 5)    1l 1l 1l 1l
  115. THIS GETS LINE PLOTS FOR THE FIRST FOUR LISTS AND NO PLOT FOR THE
  116. REST.  ALL PLOTS ARE IN COLOR 1. 
  117.  
  118. 6)    0p 1p 2p 3p 0l 1l 2l 3l
  119. THIS GETS POINT PLOTS FOR THE FIRST FOUR LISTS AND LINE PLOTS FOR THE
  120. NEXT FOUR.  THE POINT SIZE IS 4 SINCE IT IS NOT SPECIFIED.  THIS IS MY
  121. PERSONAL FAVORITE FOR THIS FILE SINCE THE FILE COMPRISES FOUR LISTS OF
  122. DATA AND FOUR LISTS OF FITS TO THAT DATA.
  123.  
  124. 7)    0p - - - 1l
  125. THIS GETS A POINT PLOT IN COLOR 0 OF THE FIRST LIST AND A LINE PLOT IN
  126. COLOR 1 OF THE FIFTH LIST.  NO OTHER LISTS ARE PLOTTED.  THE POINT
  127. SIZE IS 4.
  128.  
  129.  
  130. 8)    - 0p - - - 1l
  131. THIS GETS A POINT PLOT FOR THE SECOND LIST AND A LINE PLOT FOR THE SIXTH.
  132. OTHERWISE, THIS IS THE SAME AS (7)
  133.  
  134.  
  135.     There are more things you can specify about the plot.  I went a
  136. little crazy putting in options and still there are things left out.
  137. This will get you started.  See comments in the file "gethowto.c" for
  138. a more exhaustive description.
  139.  
  140.  
  141. **************************************************************************
  142. MENUS, ETC.
  143.  
  144.     Once you have a plot on the screen, you can zoom in and out,
  145. call up a crosshair, and generally have a splashing time peering
  146. at your data from close in.  You can write the display to a file that
  147. can then be sent to a (HPGL) plotter via something like
  148.  
  149.     "COPY MYFILE.PLT0 SER:"
  150.  
  151.     You can also export the full plot to mCAD, an object-oriented
  152. drawing program.  I've used this feature mainly to make transparencies
  153. for an overhead projector (for seminars and such.)  The current version
  154. of mp doesn't write labels, legends, or a title to the mCAD file, but,
  155. once in mCAD, you can write or draw whatever you like on the plot.
  156.  
  157.     mCAD, by the way, is a shareware program.  This is not a sneaky
  158. way to get you to use mCAD so you'll feel morally obligated to send me
  159. bucks.  I just needed to export from mp to mCAD for my own purposes and,
  160. since mp is already in the public domain, didn't see any sense in keeping 
  161. the new version to myself.
  162.